<template>
	<view class="change-role-clothes">
		<mClothesChoose ref="mClothesChoose" :maskCloseAble="false" :storyId="storyId" @buy="buy" @confirm="confirm"
			@seekTime="seekTime" actionType="confirm">
		</mClothesChoose>
	</view>
</template>

<script>
	import mClothesChoose from '@/components/m-clothes-choose/index.vue'
	import {
		mapGetters,
	} from "vuex";
	export default {
		props: {
			paramsJson: {
				type: Object,
				default: () => {
					return {}
				}
			},
			storyId: {
				type: String,
				default: ""
			}

		},
		components: {
			mClothesChoose
		},
		data() {
			return {
				jumpStoryId: "",
				show: false,


			}
		},
		computed: {
			...mapGetters(["globalGameCtx", "curStoryId"]),
		},
		watch: {

		},
		mounted() {
			// 测试时用，之后再获取dataList时调用一次即可
			// this.handleGetRoleData()
			this.getProps()
		},
		methods: {
			getProps() {
				let paramsJson = this.paramsJson
				this.jumpStoryId = paramsJson.jumpStoryId && paramsJson.jumpStoryId.default ? paramsJson.jumpStoryId
					.default : this.jumpStoryId

			},
			buy(e) {
				console.log("购买");
			},
			confirm(e) {
				// console.log("确定点击");
				if (this.jumpStoryId) {
					this.$emit("getGameResult", String(this.jumpStoryId))
				}
			},
			seekTime(e) {
				this.$emit("getGameResult", Number(e))
			},
			handleClickConfirm() {
				if (this.jumpStoryId) {
					this.$emit('getGameResult', String(this.jumpStoryId))
				}
			},
			open() {
				this.show = true
			},
			close() {
				this.show = false
			}
		}
	}
</script>

<style lang="scss" scoped>
	.change-role-clothes {
		position: absolute;
		left: 0rpx;
		top: 0rpx;
		width: 100vw;
		height: 100vh;
		pointer-events: none;
		z-index: 99999999;


	}
</style>